/*
 * hd44780-sreg.h
 *
 *  Created on: Sep 27, 2009
 *      Author: Orlando Arias
 *	   License: GPLv3
 *
 *   libhd44780 for Arduino Systems
 *   Copyright (C) 2009  Orlando Arias
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef HD44780SREG_H_
#define HD44780SREG_H_

#include "common/common.h"

typedef struct _sLCD {
	uint8_t datapin;
	uint8_t clock;
	uint8_t strobe;
} sLCD;


void lcds_clear(sLCD *l);			// same as lcds_sendCommand(l, CLEAR)
void lcds_init(sLCD *l);			// initializes LCD
void lcds_sendChar(sLCD *l, uint8_t chr);		// sends character to LCD
void lcds_sendCommand(sLCD *l, command cmd);	// sends command to LCD
void lcds_sendStr(sLCD *l, const char str[]);	// sends string to LCD
void lcds_setAC(sLCD *l, uint8_t row, uint8_t col);		// sets AC, same as lcds_sendCommand(l, SET_POSITION + locationOffset)
void lcds_writeCGRAM(sLCD *l, uint8_t location, uint8_t data[]);	// stores a character in CGRAM

#endif /* HD44780SREG_H_ */
